﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using IHISCETeim.Library;
using System.Data;
using IHISCETeim.BLL;
using System.Text;

namespace IHISCETeim.Web.MachineSys.FTradeModel
{
    public partial class Report5FTradeEasyUI : EasyUIPageBase
    {
        protected override Permission[] PowerKey
        {
            get
            {
                return new Permission[] { Permission.查看 };
            }
        }
        protected override string DWZRef
        {
            get
            {
                return "Report5FTrade";
            }
        }

        #region 属性 (查询条件)


        protected string JingXiaoShang
        {
            get
            {
                return GetRequestValue<string>("JingXiaoShang", "");

            }
        }
        protected DateTime lastDaoQiRi
        {
            get
            {
                DateTime dt = new DateTime(Year, Month, 1);

                return dt.AddMonths(1).AddDays(-1);

            }
        }

        protected int Year
        {
            get
            {
                return GetRequestValue<int>("Year", DateTime.Now.Year);
            }
        }
        protected int Month
        {
            get
            {
                return GetRequestValue<int>("Month", DateTime.Now.Month);
            }
        }

        protected decimal rate
        {
            get
            {
                return GetRequestValue<decimal>("rate", 0.6m);
            }
        }

       

        #endregion

      

        protected override string query()
        {
            DataTableCollection dts = FTradeReportController.Report5GetReportDate(rate, lastDaoQiRi, JingXiaoShang);
            return ToDataGridJson(dts[0], TotalCount, dts[1]).ToString();
        }
    }
}